# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=rshijack
pkgver=0.5.0
pkgrel=1
pkgdesc='TCP connection hijacker, rust rewrite of shijack'
url='https://github.com/kpcyrd/rshijack'
depends=('gcc-libs')
makedepends=('cargo')
arch=('loong64' 'x86_64')
license=('GPL3')
source=(https://github.com/kpcyrd/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
        https://github.com/kpcyrd/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz.asc)
sha512sums=('1f10430e9ae124e5a1d4d4e1af00ae4c46ba04ab2b6781684b5dd679ddfca5742912e4a1ec594395c5054e4cab38f7c498262a5cff1eb187dedda4035d8f44fd'
            'SKIP')
b2sums=('fcb50b15701aea574b44bf1366c6106331c19fe92690304182cb183dadc6be78963677b269f9e1733687c46b1f991ec4720a1aca641e1581b40030e031822736'
        'SKIP')

validpgpkeys=("64B13F7117D6E07D661BBCE0FE763A64F5E54FD6")

build() {
  cd ${pkgname}-${pkgver}
  cargo build --release --locked
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 target/release/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
